import request from "@/utils/request";

// 查询合同信息列表
export function listDetail(query) {
  return request({
    url: "/system/detail/list",
    method: "get",
    params: query,
  });
}

// 查询合同信息详细
export function getDetail(id) {
  return request({
    url: "/system/detail/" + id,
    method: "get",
  });
}

// 预览合同信息
export function preViewDetail(data) {
  return request({
    url: "/contract/info/preview",
    method: "post",
    data: data,
  });
}
// 新增合同信息
export function addDetail(data) {
  return request({
    url: "/contract/info",
    method: "post",
    data: data,
  });
}

// 修改合同信息
export function updateDetail(data) {
  return request({
    url: "/system/detail",
    method: "put",
    data: data,
  });
}

// 删除合同信息
export function delDetail(id) {
  return request({
    url: "/system/detail/" + id,
    method: "delete",
  });
}

// 派单
export function getWorks(id) {
  return request({
    url: "/system/detail/selectContractDetailList/" + id,
    method: "get",
  });
}

//获取合同主体下拉
export function getPartyBOptions() {
  return request({
    url: "/companyInfo/info/list",
    method: "get",
  });
}
